home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-06-08 | 5.2 KB | 199 lines | [TEXT/MPS ] |
- # Makefile for GNU Awk.
- #
- # Copyright (C) 1986, 1988, 1989 the Free Software Foundation, Inc.
- #
- # This file is part of GAWK, the GNU implementation of the
- # AWK Progamming Language.
- #
- # GAWK is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 1, or (at your option)
- # any later version.
- #
- # GAWK is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with GAWK; see the file COPYING. If not, write to
- # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- #
- # MPW Makefile 02Jun91 Matthias Ulrich Neeracher <neeri@iis.ethz.ch>
- #
-
- # User tunable macros
-
- # To port GAWK, examine and adjust the following flags carefully.
- # In addition, you will have to look at alloca below.
- # The intent (eventual) is to not penalize the most-standard-conforming
- # systems with a lot of #define's.
- #
- # -DBCOPY_MISSING - bcopy() et al. are missing; will replace
- # with a #define'd memcpy() et al. -- use at
- # your own risk (should really use a memmove())
- # -DSPRINTF_INT - sprintf() returns int (most USG systems)
- # -DBLKSIZE_MISSING - st_blksize missing from stat() structure
- # (most USG systems)
- # -DBSDSTDIO - has a BSD internally-compatible stdio
- # -DDOPRNT_MISSING - lacks doprnt() routine
- # -DDUP2_MISSING - lacks dup2() system call (S5Rn, n < 4)
- # -DGCVT_MISSING - lacks gcvt() routine
- # -DGETOPT_MISSING - lacks getopt() routine
- # -DMEMCMP_MISSING - lacks memcmp() routine
- # -DMEMCPY_MISSING - lacks memcpy() routine
- # -DMEMSET_MISSING - lacks memset() routine
- # -DRANDOM_MISSING - lacks random() routine
- # -DSTRCASE_MISSING - lacks strcasecmp() routine
- # -DSTRCHR_MISSING - lacks strchr() and strrchr() routines
- # -DSTRERROR_MISSING - lacks (ANSI C) strerror() routine
- # -DSTRTOD_MISSING - lacks strtod() routine
- # -DTMPNAM_MISSING - lacks or deficient tmpnam() routine
- # -DVPRINTF_MISSING - lacks vprintf and associated routines
-
- MISSING = -d BCOPY_MISSING ∂
- -d SPRINTF_INT ∂
- -d BLKSIZE_MISSING ∂
- -d DOPRNT_MISSING ∂
- -d DUP2_MISSING ∂
- -d GCVT_MISSING ∂
- -d GETOPT_MISSING ∂
- -d RANDOM_MISSING ∂
- -d STRCASE_MISSING
-
- # Comment out the next line if you don't have gcc.
- # Also choose just one of -g and -O.
- #C = gC
-
- C = C
-
- DEBUG = #-sym on -mbg on
- LDEBUG = #-sym 'On '
- OPTIMIZE = #-opt full # for gcc only
- WARN = #-W -Wunused -Wimplicit -Wreturn-type -Wcomment # for gcc only
-
- # Install installs the tools here
-
- ToolDir = "{MPW}Tools:"
-
- # Parser to use on grammar -- if you don't have bison use the first one
- #PARSER = yacc
- PARSER = bison
-
- # ALLOCA
- # Set equal to alloca.o if your system is S5 and you don't have
- # alloca. Uncomment one of the rules below to make alloca.o from
- # either alloca.s or alloca.c.
- ALLOCA = alloca.c.o
-
- #
- # With the exception of the alloca rule referred to above, you shouldn't
- # need to customize this file below this point.
- #
-
- FLAGS = {MISSING} {DEBUG}
- COptions = {FLAGS} {OPTIMIZE} {WARN} -s awk
-
- # object files
- AWKOBJS = main.c.o ∂
- eval.c.o ∂
- builtin.c.o ∂
- msg.c.o ∂
- debug.c.o ∂
- io.c.o ∂
- field.c.o ∂
- array.c.o ∂
- node.c.o ∂
- version.c.o ∂
- missing.c.o
-
- ALLOBJS = {AWKOBJS} awk.tab.c.o
-
- # Has to be subdivided for segmentation
-
- AWKOBJS1 = main.c.o ∂
- eval.c.o ∂
- builtin.c.o ∂
- msg.c.o ∂
- debug.c.o
-
- AWKOBJS2 = io.c.o ∂
- field.c.o ∂
- array.c.o ∂
- node.c.o ∂
- version.c.o ∂
- missing.c.o
-
- # GNUOBJS
- # GNU stuff that gawk uses as library routines.
- GNUOBJS = regex.c.o {ALLOCA}
-
- # source and documentation files
- SRC = main.c ∂
- eval.c ∂
- builtin.c ∂
- msg.c ∂
- debug.c ∂
- io.c ∂
- field.c ∂
- array.c ∂
- node.c ∂
- missing.c
-
- ALLSRC = {SRC} awk.tab.c
-
- AWKSRC = awk.h awk.y {ALLSRC} patchlevel.h gawk.r
-
- GNUSRC = alloca.c regex.c regex.h
-
- DOCS = gawk.help gawk.txt
-
- MISC = CHANGES COPYING FUTURES Makefile PROBLEMS README README.MPW
-
- ALLFILES = {AWKSRC} {GNUSRC} {MISC} {DOCS}
-
- # Release of gawk. There can be no leading or trailing white space here!
- REL=2.11.1r3
-
- # rules to build gawk
-
- awk1.o ƒ {AWKOBJS1}
- Lib -o awk1.o -sym 'On ' -sg awk1=awk {AWKOBJS1}
-
- awk2.o ƒ {AWKOBJS2}
- Lib -o awk2.o -sym 'On ' -sg awk2=awk {AWKOBJS2}
-
- Gawk ƒƒ awk1.o awk2.o awk.tab.c.o {GNUOBJS}
- Link -t MPST -c 'MPS ' -w -o Gawk {LDEBUG} ∂
- awk1.o awk2.o awk.tab.c.o {GNUOBJS} ∂
- {CLibraries}CRuntime.o ∂
- {CLibraries}CInterface.o ∂
- {CLibraries}StdCLib.o ∂
- {Libraries}Runtime.o ∂
- {Libraries}Interface.o ∂
- {Libraries}ToolLibs.o ∂
- {CLibraries}Math.o ∂
- {CLibraries}CSANELib.o
-
- Gawk ƒƒ gawk.r
- Rez -o Gawk -t MPST -c 'MPS ' -a gawk.r
-
- Install ƒ Gawk
- Move Gawk {ToolDir}
-
- {AWKOBJS}ƒ awk.h
-
- main.c.o ƒ patchlevel.h
-
- awk.tab.c.oƒ awk.h awk.tab.c
- {C} awk.tab.c -o awk.tab.c.o {FLAGS} {OPTIMIZE} {WARN} -s awk3
-
- awk.tab.cƒ awk.y
- {PARSER} -v awk.y
-
- # auxiliary rules for release maintenance
-
- cleanƒ
- delete -y -i gawk ≈.o awk.output gawk.sym ≈.makeout
-